/*------------------------------------------------------------------------------------------------
** Program 	:	stack.h
** Project	:	Realtime
** CPU		:	STM32F100
** Date		:	12/1/2011
** Modify	:	Jetsada Machom <Zinuzoid Corporation Co.,Ltd.>
** Copyright:	
** Note 	:	
------------------------------------------------------------------------------------------------*/

#include <stdint.h>

typedef int32_t  s32;
typedef int16_t s16;
typedef int8_t  s8;
typedef uint32_t  u32;
typedef uint16_t u16;
typedef uint8_t  u8;



#define	STACK_SIZE	50//max u8

struct stack_char
{
	char value[STACK_SIZE];
	u8 top;
};

struct stack_double
{
	double value[STACK_SIZE];
	u8 top;
};

void empty_stack_char(struct stack_char *s);
u8 is_stack_empty_char(struct stack_char *s);
void push_char(struct stack_char *s,char value);
char pop_char(struct stack_char *s);
void stack_display_char(struct stack_char s);

void empty_stack_double(struct stack_double *s);
u8 is_stack_empty_double(struct stack_double *s);
void push_double(struct stack_double *s,double value);
double pop_double(struct stack_double *s);

